#include "UdpServer.hpp"
#include <memory>
#include <iostream>
#include <bits/stdc++.h>
#include "Comm.hpp"
using namespace std;

void Usage(std::string proc)
{
    std::cout << "Usage: \n\t" << proc << " local_ip local_port\n"
              << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 3) // 参数数量
    {
        Usage(argv[0]);
        return Usage_Err;
    }

    std::string ip = argv[1];
    uint16_t port = stoi(argv[2]);

    std::unique_ptr<UdpServer> usvr = std::make_unique<UdpServer>(); // 目前用的是初始值

    usvr->Init();
    usvr->Start();
}